<template>
  <el-dialog
    append-to-body
    :title="info"
    :visible.sync="dialogVisible"
    align="left"
    v-loading="currLoading"
    element-loading-text="拼命加载中"
    element-loading-spinner="el-icon-loading"
    element-loading-background="rgba(0, 0, 0, 0.8)"
    width="1300px">
    <div>
      <product-stock-page v-if="dialogVisible" :product-data="currProduct"/>
    </div>
  </el-dialog>
</template>

<script>

import ProductStockPage from '../Page/ProductStockPage'

export default {
  name: 'ShopStockListDialog',
  components: {ProductStockPage},
  props: {
    successFunction: Function
  },
  data: function () {
    return {
      info: '商品库存详情',
      dialogVisible: false,
      currLoading: false,
      currProduct: {
        id: 1
      }
    }
  },
  mounted () {
  },
  methods: {
    open: function (currProduct) {
      this.currProduct = currProduct
      // console.log(JSON.stringify(currProduct))
      this.dialogVisible = true
      this.$forceUpdate()
    },
    submit: function () {
    }
  }
}
</script>

<style scoped>

</style>
